#include <STC89C5xRC.H>
#include "Delay.h"



unsigned char Key()
{
	unsigned char KeyNum=0;
	
	if(P31==0){Delay(30);while(P31==0);Delay(30);KeyNum=1;}
	if(P30==0){Delay(30);while(P30==0);Delay(30);KeyNum=2;}
	if(P32==0){Delay(30);while(P32==0);Delay(30);KeyNum=3;}
	if(P33==0){Delay(30);while(P33==0);Delay(30);KeyNum=4;}
	return KeyNum;
}